package com.meixiang.entity.myOrder;

import android.os.Parcel;
import android.os.Parcelable;

import com.meixiang.view.photoSelectActivity.util.ImageItem;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yinsujun  Created at 2016/6/28 13:20
 */
public class EvaluateCommit implements Parcelable {

    /**
     * gevalOrderid : 订单id
     * gevalGoodsList : [{"gevalGoodsid":"商品id","tagIdArray":["1","2","3"],"gevalContent":"评价内容","scores":"星级数量","scoresText":"惊喜"}]
     */

    private String gevalOrderid;
    /**
     * gevalGoodsid : 商品id
     * tagIdArray : ["1","2","3"]
     * gevalContent : 评价内容
     * scores : 星级数量
     * scoresText : 惊喜
     */

    private List<GevalGoodsListBean> gevalGoodsList;

    public String getGevalOrderid() {
        return gevalOrderid;
    }

    public void setGevalOrderid(String gevalOrderid) {
        this.gevalOrderid = gevalOrderid;
    }

    public List<GevalGoodsListBean> getGevalGoodsList() {
        return gevalGoodsList;
    }

    public void setGevalGoodsList(List<GevalGoodsListBean> gevalGoodsList) {
        this.gevalGoodsList = gevalGoodsList;
    }

    public static class GevalGoodsListBean implements Parcelable {
        private String gevalGoodsid;
        private String gevalContent;
        private String scores;
        private String scoresText;
        private List<String> tagIdArray;

        public String getGevalGoodsid() {
            return gevalGoodsid;
        }

        public void setGevalGoodsid(String gevalGoodsid) {
            this.gevalGoodsid = gevalGoodsid;
        }

        public String getGevalContent() {
            return gevalContent;
        }

        public void setGevalContent(String gevalContent) {
            this.gevalContent = gevalContent;
        }

        public String getScores() {
            return scores;
        }

        public void setScores(String scores) {
            this.scores = scores;
        }

        public String getScoresText() {
            return scoresText;
        }

        public void setScoresText(String scoresText) {
            this.scoresText = scoresText;
        }

        public List<String> getTagIdArray() {
            return tagIdArray;
        }

        public void setTagIdArray(List<String> tagIdArray) {
            this.tagIdArray = tagIdArray;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.gevalGoodsid);
            dest.writeString(this.gevalContent);
            dest.writeString(this.scores);
            dest.writeString(this.scoresText);
            dest.writeStringList(this.tagIdArray);
        }

        public GevalGoodsListBean() {
        }

        protected GevalGoodsListBean(Parcel in) {
            this.gevalGoodsid = in.readString();
            this.gevalContent = in.readString();
            this.scores = in.readString();
            this.scoresText = in.readString();
            this.tagIdArray = in.createStringArrayList();
        }

        public static final Creator<GevalGoodsListBean> CREATOR = new Creator<GevalGoodsListBean>() {
            @Override
            public GevalGoodsListBean createFromParcel(Parcel source) {
                return new GevalGoodsListBean(source);
            }

            @Override
            public GevalGoodsListBean[] newArray(int size) {
                return new GevalGoodsListBean[size];
            }
        };

        @Override
        public String toString() {
            return "GevalGoodsListBean{" +
                    "gevalGoodsid='" + gevalGoodsid + '\'' +
                    ", gevalContent='" + gevalContent + '\'' +
                    ", scores='" + scores + '\'' +
                    ", scoresText='" + scoresText + '\'' +
                    ", tagIdArray=" + tagIdArray +
                    '}';
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.gevalOrderid);
        dest.writeList(this.gevalGoodsList);
    }

    public EvaluateCommit() {
    }

    protected EvaluateCommit(Parcel in) {
        this.gevalOrderid = in.readString();
        this.gevalGoodsList = new ArrayList<GevalGoodsListBean>();
        in.readList(this.gevalGoodsList, GevalGoodsListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<EvaluateCommit> CREATOR = new Parcelable.Creator<EvaluateCommit>() {
        @Override
        public EvaluateCommit createFromParcel(Parcel source) {
            return new EvaluateCommit(source);
        }

        @Override
        public EvaluateCommit[] newArray(int size) {
            return new EvaluateCommit[size];
        }
    };

    @Override
    public String toString() {
        return "EvaluateCommit{" +
                "gevalOrderid='" + gevalOrderid + '\'' +
                ", gevalGoodsList=" + gevalGoodsList +
                '}';
    }
}
